package com.glorysoft.knowlespda.bindingadapter

import android.graphics.Color
import android.graphics.drawable.Drawable
import android.widget.CheckBox
import android.widget.CompoundButton
import android.widget.TextView
import androidx.databinding.BindingAdapter
import com.glorysoft.knowlespda.entity.BoardIdEntity
import com.glorysoft.knowlespda.entity.HomeEntity
import com.glorysoft.knowlespda.entity.PairingEntity

/**
 * FileName: TabIndexGridAdapter
 * Author: XJH
 * Date: 2021/5/13 17:46
 * Description:
 * History:
 */
object NoticeBgAdapter {

    @BindingAdapter(value = ["noticeTextColor"], requireAll = false)
    @JvmStatic
    fun setNoticeTextColor(textView: TextView, item: HomeEntity.NoticeEntity) {
        when (item.noticetype) {
            "ReplaceIn" -> {
                textView.setTextColor(Color.BLUE)
            }
            "ReplaceOut" -> {
                textView.setTextColor(Color.RED)
            }
            "Transfer" -> {
                textView.setTextColor(Color.GREEN)
            }

        }
    }

}